﻿@{
    var layout = OperationPlugins.WebApp.Views.Layout.Current;
}
<!DOCTYPE html>

<html>
<head>

    <meta charset="utf-8">
    <title>@ViewBag.Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="@Url.Content(string.Format("~/Content/Bootswatch/{0}.css", layout.Theme))" rel="stylesheet" />
    <link href="@Url.Content("~/Content/app.css")" rel="stylesheet" />
    <link href="@Url.Content("~/Content/font-awesome.css")" rel="stylesheet" />
    <script src="@Url.Content("~/Scripts/jquery-2.1.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/bootstrap.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/knockout-3.1.0.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/knockout.mapping-latest.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/perpetuum.knockout.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/json2.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/knockout.reactor.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/bootbox.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/app.js")" type="text/javascript"></script>
    @RenderSection("head", required: false)
</head>
<body>
    @{
        var inverse1 = "";
        if (layout.InverseTheme)
        {
            inverse1 = "navbar-inverse";
        }
    }
    <div class="navbar @inverse1 navbar-fixed-top">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-inverse-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">OperationPlugins</a>
        </div>

        @{
            var inverse2 = "navbar-collapse";
            if (layout.InverseTheme)
            {
                inverse2 = "navbar-inverse-collapse";
            }
        }

        <div class="navbar-collapse collapse @inverse2"></div>
    </div>

    <div class="col-lg-12 op-content">
        @* Navigation *@
        <div class="col-lg-3 op-nav">
            <ul class="nav nav-pills nav-stacked">
                @{
                    var classForApplications = layout.CurrentActionUnderApplications ? "active" : "";
                    var classForEventLogs = layout.CurrentActionUnderEventLogs ? "active" : "";
                    var classForPreferences = layout.CurrentActionUnderPreferences ? "active" : "";
                }
                <li class="@classForApplications"><a href="@Url.Action("Applications", "Admin")">Applications</a></li>
                <li class="@classForEventLogs"><a href="@Url.Action("EventLogs", "Admin")">Event Logs</a></li>

                @*<a href="http://www.google.fi">Errors <span class="badge">3</span></a>*@

                <li class="@classForPreferences"><a href="@Url.Action("Preferences", "Admin")">Preferences</a></li>
            </ul>
        </div>

        @* Body *@
        <div class="col-lg-9">
            @RenderBody()
        </div>
    </div>

    @{
        var inverse3 = "navbar";
        if (layout.InverseTheme)
        {
            inverse3 = "navbar-inverse";
        }
    }

    @* Footer *@
    <div class="footer @inverse3 navbar-fixed-bottom op-footer">
        <div class="col-sm-12 op-footer-text">
            <small>
                @HttpUtility.HtmlDecode(@layout.ProductInfoText)
            </small>
        </div>
    </div>
</body>
</html>
